package com.system.dao;

import com.system.entity.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.CrossOrigin;

import java.util.List;
@CrossOrigin
@Repository
public interface TakecourseMapper {
    int deleteByPrimaryKey(TakecourseKey key);

    int insert(Takecourse record);

    int insertSelective(Takecourse record);

    Takecourse selectByPrimaryKey(TakecourseKey key);

    int updateByPrimaryKeySelective(Takecourse record);

    int updateByPrimaryKey(Takecourse record);

    public List <SelectCourse> selectCourse(Long stu_id);

    public List<Grade> findByStudentId(Long stu_id);

    public List<Grade> findBySemester(@Param("stu_id") Long stu_id, @Param("semester") String semester);

    public List<Grade> findByCourseType(Long stu_id,String courseType);

    public List<Grade> findByCourseID(Long stu_id,Integer course_id);

    public List<Grade> findByCourseName(Long stu_id,String course_name);

    public List<Grade> findBySemName(Long stu_id,String semester,String course_name);

    public List<Grade> findBySemType(Long stu_id,String semester,String courseType);

    public List<Grade> findBySemId(Long stu_id,String semester,Integer course_id);

    public List<String> findGrade(Integer id);
}
